package com.cnblsp2.android.study.androidresources;

import com.cnblsp2.android.study.androidresources.anim.MyAnimActivity;
import com.cnblsp2.android.study.androidresources.attr.AttrResActivity;
import com.cnblsp2.android.study.androidresources.clip.ClipDrawableActivity;
import com.cnblsp2.android.study.androidresources.menu.MenuResActivity;
import com.cnblsp2.android.study.androidresources.mybar.MyBarActivity;
import com.cnblsp2.android.study.androidresources.myimage.MyImageActivity;
import com.cnblsp2.android.study.androidresources.myshape.ShapeDrawableActivity;
import com.cnblsp2.android.study.androidresources.originxml.OriginalXmlActivity;
import com.cnblsp2.android.study.androidresources.raw.RawResActivity;
import com.cnblsp2.android.study.androidresources.styletheme.MyStyleActivity;
import com.cnblsp2.android.study.androidresources.styletheme.MyThemeActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity {

	private Button activity_main_myimage_btn = null;

	private Button activity_main_mybar_btn = null;

	private Button activity_main_myshape_btn = null;

	private Button activity_main_clip_btn = null;

	private Button activity_main_anim_btn = null;

	private Button activity_main_original_btn = null;

	private Button activity_main_menures_btn = null;

	private Button activity_main_style_btn = null;

	private Button activity_main_theme_btn = null;

	private Button activity_main_attrres_btn = null;

	private Button activity_main_rawres_btn = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		activity_main_myimage_btn = (Button) this.findViewById(R.id.activity_main_myimage_btn);
		activity_main_myimage_btn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MyImageActivity.class);
				startActivity(intent);
			}
		});

		activity_main_mybar_btn = (Button) this.findViewById(R.id.activity_main_mybar_btn);
		activity_main_mybar_btn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MyBarActivity.class);
				startActivity(intent);
			}
		});

		activity_main_myshape_btn = (Button) this.findViewById(R.id.activity_main_myshape_btn);
		activity_main_myshape_btn.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, ShapeDrawableActivity.class);
				startActivity(intent);
			}
		});

		activity_main_clip_btn = (Button) this.findViewById(R.id.activity_main_clip_btn);
		activity_main_clip_btn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, ClipDrawableActivity.class);
				startActivity(intent);
			}
		});

		activity_main_anim_btn = (Button) this.findViewById(R.id.activity_main_anim_btn);
		activity_main_anim_btn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MyAnimActivity.class);
				startActivity(intent);
			}
		});

		activity_main_original_btn = (Button) this.findViewById(R.id.activity_main_originalxml_btn);
		activity_main_original_btn.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, OriginalXmlActivity.class);
				startActivity(intent);
			}
		});

		activity_main_menures_btn = (Button) this.findViewById(R.id.activity_main_menures_btn);
		activity_main_menures_btn.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MenuResActivity.class);
				startActivity(intent);
			}
		});

		activity_main_style_btn = (Button) this.findViewById(R.id.activity_main_style_btn);
		activity_main_style_btn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MyStyleActivity.class);
				startActivity(intent);
			}
		});

		activity_main_theme_btn = (Button) findViewById(R.id.activity_main_theme_btn);
		activity_main_theme_btn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MyThemeActivity.class);
				startActivity(intent);
			}
		});
		/***/
		activity_main_attrres_btn = (Button) findViewById(R.id.activity_main_attrres_btn);
		activity_main_attrres_btn.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, AttrResActivity.class);
				startActivity(intent);
			}
		});

		activity_main_rawres_btn = (Button) this.findViewById(R.id.activity_main_rawres_btn);
		activity_main_rawres_btn.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, RawResActivity.class);
				startActivity(intent);
			}
		});

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
